package com.xd.core.company.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xd.core.company.entity.BindBank;
import com.xd.core.company.mapper.BindBankMapper;
import com.xd.core.company.service.IBindBankService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xd.core.company.vo.BindBankVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 机构绑定银行卡信息 服务实现类
 * </p>
 *
 * @author ZX
 * @since 2025-03-05
 */
@Service
public class BindBankServiceImpl extends ServiceImpl<BindBankMapper, BindBank> implements IBindBankService {
    @Autowired
    private BindBankMapper bindBankMapper;

    @Override
    public List<BindBank> getAccountList(Integer id) {
        LambdaQueryWrapper<BindBank> wrapper = new LambdaQueryWrapper<BindBank>().eq(BindBank::getCompanyId, id);
        return list(wrapper);
    }

    @Override
    public List<BindBankVo> getWhileAccountDown(Integer id) {
        return bindBankMapper.selectAccount(id);
    }
}
